﻿@model SevenSpikes.Nop.AjaxFilters.Models.ProductsModel           
@using Nop.Web.Models.Catalog;
@using Nop.Web.Extensions;

<div id="nopAjaxFiltersNoProductsDialog" title="No Results Found">
	<p>There are no products for the filters that you selected. Please widen your search criteria.</p>
</div>

@if (Model.Products.Any())
{
    if (Model.ViewMode == "list")
    {
@*list mode*@
    <div class="@Model.NopAjaxFiltersSettingsModel.ProductsListPanelSelector.TrimStart(new [] {'.'})">
        @foreach (var product in Model.Products)
        {
            <div class="item-box">
                @Html.Partial("_ProductBox", product, new ViewDataDictionary())
            </div>
        }
    </div>       
    }
    else
    {
@*grid mode*@
    <div class="@Model.NopAjaxFiltersSettingsModel.ProductsGridPanelSelector.TrimStart(new [] {'.'})">
        @(Html.DataList<ProductOverviewModel>(Model.Products, 2,
            @<div class="item-box">
                @Html.Partial("_ProductBox", @item, new ViewDataDictionary())
            </div>
                ))
    </div>
    }
}

<div class="@Model.NopAjaxFiltersSettingsModel.PagerPanelSelector.TrimStart(new [] {'.'})">
        @Html.Pager(Model.PagingFilteringContext).QueryParam("pagenumber")
</div>

@Html.Hidden("specificationFilterModel7SpikesJson", Model.SpecificationFilterModel7SpikesJson)
@Html.Hidden("attributeFilterModel7SpikesJson", Model.AttributeFilterModel7SpikesJson)
@Html.Hidden("manufacturerFilterModel7SpikesJson", Model.ManufacturerFilterModel7SpikesJson)